package com.wench.design.pattern.adapter.object_adapter;

/**
 * @author wench
 */
public class SdAdapterTf implements SdCard {

    // 声明适配者类
    private TfCard tfCard;

    public SdAdapterTf(TfCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSd() {
        System.out.println("adapter read tf card.....");
        return tfCard.readTf();
    }

    @Override
    public void writeSd(String msg) {
        System.out.println("adapter write tf card");
        tfCard.writeTf(msg);
    }
}
